<?php
/**
* @file media_db_showcase.php
* @version 0.0.1
* @package Media_db
* @copyright Copyright (C) 2006 Nikolai Plath. All rights reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
///////////
// Einzeldarstellung
////////////
function ShowCase ( $showid, $medias, $kats, $mediaitems, $mdb_acclevel ) {
global $mbd_acclevel;
	echo '
	 <div class="mdb_titlebox">' .
	'<div class="mdb_titlemessage1">'.$medias[$showid-1]->gruppe.'</div>' .
	'<div class="mdb_titlemessage2">'.$medias[$showid-1]->titel.'</div>' .
	'</div>';
	echo '<table border="1" width="100%">' .
	'	<tr valign="top">
			<td>
				<table class="medialist" width="100%">
				  <tr class="row0"><th scope="row"><div align="right">ID</div></th><td class="inp1">'.$medias[$showid-1]->unique_id.'</td></tr>
				  <tr class="row1"><th scope="row"><div align="right">Interpret</div></th><td class="inp1">'.$medias[$showid-1]->gruppe.'</td></tr>
				  <tr><th scope="row"><div align="right">Titel</div></th><td class="inp1">'.$medias[$showid-1]->titel.'</td></tr>
				  <tr class="row0"><th scope="row"><div align="right">Jahr</div></th><td class="inp1">'.$medias[$showid-1]->jahr.'</td></tr>
				  <tr class="row0"><th scope="row"><div align="right">Media</div></th><td class="inp1">'.$kats[$medias[$showid-1]->id_kat-1]->name.'</td></tr>';
//					if ( $mdb_acclevel >= 1 ) {
						echo '
						<tr class="row1"><th scope="row"><div align="right">Vertrieb</div></th><td class="inp0">'.$medias[$showid-1]->vertrieb.'</td></tr>
						<tr class="row1"><th scope="row"><div align="right">Produzent</div></th><td class="inp0">'.$medias[$showid-1]->produzent.'</td></tr>
						<tr class="row1"><th scope="row"><div align="right">Identit&auml;tsnummer</div></th><td class="inp0">'.$medias[$showid-1]->itaenr.'</td></tr>
						<tr class="row1"><th scope="row"><div align="right">Bestellnummer</div></th><td class="inp0">'.$medias[$showid-1]->bestnr.'</td></tr>
						<tr class="row1"><th scope="row"><div align="right">Bearbeiter</div></th><td class="inp0">'.$medias[$showid-1]->bearbeiter.'</td></tr>
						<tr class="row1"><th scope="row"><div align="right">Arrangeur</div></th><td class="inp0">'.$medias[$showid-1]->arrangeur.'</td></tr>';
//					}  
//					if ( $mdb_acclevel >= 1 ) {
						echo '
						<tr class="row2"><th scope="row"><div align="right">Erstellt am</div></th><td class="inp2">'.mdb_reorderDate($medias[$showid-1]->created).'</td></tr>
						<tr class="row0"><th scope="row"><div align="right">von</div></th><td class="inp2">'.$medias[$showid-1]->created_by.'</td></tr>
						<tr class="row2"><th scope="row"><div align="right">Ge&auml;ndert am</div></th><td class="inp2">'.mdb_reorderDate($medias[$showid-1]->modified).'</td></tr>
						<tr class="row2"><th scope="row"><div align="right">von</div></th><td class="inp2">'.$medias[$showid-1]->modified_by.'</td></tr>';
//					}  
				echo '
				</table>
			</td>
			<td width="150" align="center" valign="middle">';
				$picpath="images/stories/dsk_covers/".$medias[$showid-1]->bildpfad;
				if ($medias[$showid-1]->bildpfad){
					echo '<img src="'.$picpath.'" />';
				}
				else echo 'Kein Bild..';
			echo '
			</td>
		</tr>
	</table>
	
					<table class="medialist" width="100%">
					<th align="center">Nr.</th><th>Titel</th><th>Spielzeit</th><th>Bandmitglieder</th><th>Songwriter</th><th>Komponisten</th><th>Herkunftsland/Stadt</th>';
					$i=0;
					foreach ( $mediaitems as $mediaitem ) {
					echo '
					<tr class="row'.$i.'" valign="top">
						<td align="center">'.$mediaitem->ord.'</td>
						<td>'.$mediaitem->titel.'</td>
						<td>'.$mediaitem->spielzeit.'</td>
						<td>'.mdb_format_cut($mediaitem->bandmitglieder, 20).'</td>
						<td>'.mdb_format_cut($mediaitem->songwriter, 20).'</td>
						<td>'.mdb_format_cut($mediaitem->komponisten, 20).'</td>
						<td>'.mdb_format_cut($mediaitem->herkunft,20).'</td>
					</tr>';
					$i = 1- $i;
				}
				echo '
				</table>
';
}
?>